Repository navigation
refactor: simplify synchronization state and test tooling - #430
Merged
Merged
Conversation
OnceCell and LazyCell check the slot under exclusive access before initializing it. Reject an occupied slot before touching its value to avoid leaving a partially dropped value marked as published if its destructor panics.
Pin::set drops the old state in place before installing its replacement. Keep the poison guard around the completed future's destructor.
Advance the version, exchange the value and detach the waiters under one lock. Callers retain ownership of the exchanged value across the lock boundary, including if the counter overflows.
Both reset modes transfer the waker when detaching a waiting node. Represent that transition once so a notified manual-reset waiter stays ready across reset and cannot retain a waker.
The stored phase identifies an arrival that still needs to be observed. The same value prevents a repeated arrival or withdrawal from decrementing the count twice.
Compute the minimum, median and maximum with the harness summary function. Print the original measurements so slow early runs and timing drift remain visible.
Keep the selected binaries in execution order and use the same command builder for each. The library suite runs first with all features.
An old value can panic during destruction. Mark the slot empty before calling its destructor and publish the replacement only after writing it. This preserves exclusive overwrite semantics and prevents the cell from dropping the old value again during unwinding.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Pin::setfor the state transitions that install and drop a lazy initializer.cargo x miriin execution order.